$(document).ready(function(){
$('#change-pass-form').submit(function(){
    var oldPassword = $('#oldPassword').notEmpty({errorClass: ".change-pass-old-error"});
    var oldpasswordEqual = $('#oldPassword').equal({errorClass: ".change-pass-oldPassword-error", equalTo: "#empPassword"});
    var rePassword =  $('#CHrePassword').notEmpty({errorClass: ".change-pass-rePassword-error"});
    var password = $('#CHpassword').notEmpty({errorClass: ".change-pass-password-error"});
    var passwordEqual = $('#CHrePassword').equal({errorClass: ".change-pass-rePassword-error", equalTo: "#CHpassword"});
    var complex = $('#CHpassword').complexPassword();
    
    if(!oldPassword ||!oldpasswordEqual || !rePassword || !passwordEqual || complex == "short" || complex == "weak" )
        {
    	return false;
        }
    else
        {
    	return true; 
    	}
});
$('#CHpassword').keyup(function(){
    var complex = $('#CHpassword').complexPassword();
    });
});